home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000007_icon-group-sender _Fri Aug 19 10:19:34 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  866b

  1. Received: by cheltenham.cs.arizona.edu; Fri, 19 Aug 1994 08:58:13 MST
  2. Date: Fri, 19 Aug 94 10:19:34 CDT
  3. From: "Richard L. Goerwitz" <goer@midway.uchicago.edu>
  4. Message-Id: <9408191519.AA08912@midway.uchicago.edu>
  5. To: icon-group@cs.arizona.edu
  6. Subject: wil
  7. Errors-To: icon-group-errors@cs.arizona.edu
  8.  
  9. Why not just use a shell script or something?  You get wild
  10. cards that way and other natural byproducts of doing things
  11. in a Unix-like manner:
  12.  
  13. :
  14. #! /bin/sh
  15. #
  16. # Simple shell script to locate Icon source and object files
  17. #
  18.  
  19. if test .$1 = .
  20. then
  21.     echo "`basename $0`:  no filename!"
  22.     exit 2
  23. fi
  24.  
  25. bname=`basename $1 .icn`
  26.  
  27. for i in ${IPATH:-'.'} $LPATH
  28. do
  29.     if test -f ${i}/${bname}.u1
  30.     then
  31.     ls ${i}/${bname}.u1
  32.     exit 0
  33.     fi
  34.     if test -f ${i}/${bname}.icn
  35.     then
  36.     ls ${i}/${bname}.icn
  37.     exit 0
  38.     fi
  39. done
  40. exit 1
  41.